package com.xiaoc.bulldozer.service;


import com.xiaoc.bulldozer.common.dto.WeixinUserDto;

public interface WeixinUserFacade {

    /**
     * 根据sessionId获取用户信息
     *
     * @param sessionId
     * @return
     */
    public WeixinUserDto getWeixinUserDtoBySessionId(String sessionId);

    /**
     * 存放weixinUserDto到sessionId的缓存中
     *
     * @param sessionId
     * @param weixinUserDto
     */
    public void putWeixinUserDto(String sessionId, WeixinUserDto weixinUserDto);

    /**
     * 根据openId创建weixinUserDto
     *
     * @param openId
     * @return
     *//*
    public WeixinUserDto createWeixinUserDto(String openId);*/

    /**
     * 根据openId创建weixinUserDto
     *
     * @param openId
     * @param sessionKey
     * @return
     */
    public WeixinUserDto createWeixinUserDto(String openId, String sessionKey);
    /**
     * 创建sessionId
     *
     * @param openId
     * @return
     */
    public String generateSessionId(String openId);

    /**
     * 更新微信用户信息
     */
    public void updateWeixinUserInfo(WeixinUserDto weixinUserDto);

    /**
     * 更新微信用户地理位置
     *
     * @param userInfo
     */
    public void updateWeixinUserAddress(WeixinUserDto weixinUserDto);

    /**
     * 根据openId获取微信用户信息
     *
     * @param openId
     * @return
     */
    public WeixinUserDto getWeixinUserDtoByOpenId(String openId);

    /**
     * 获取当前用户
     * @return
     */
    WeixinUserDto getCurrentWeixinUserDto();


}
